﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NickPowell.LiveCode
{
    public class TextChange
    {
        private int iUserID = -1;
        private int iSeq = -1;

        private int iStartLine = -1;
        private int iStartIndex = -1;
        private int iNewEndLine = -1;
        private int iNewEndIndex = -1;
        private int iOldEndLine = -1;
        private int iOldEndIndex = -1;
        private string sText = "";

        public int UserID
        {
            get
            {
                return this.iUserID;
            }

        }

        public int Seq
        {
            get
            {
                return this.iSeq;
            }
        }

        public int StartLine
        {
            get
            {
                return this.iStartLine;
            }
        }

        public int StartIndex
        {
            get
            {
                return this.iStartIndex;
            }
            set
            {
                this.iStartIndex = value;
            }
        }

        public int NewEndLine
        {
            get
            {
                return this.iNewEndLine;
            }
        }

        public int NewEndIndex
        {
            get
            {
                return this.iNewEndIndex;
            }
        }

        public int OldEndLine
        {
            get
            {
                return this.iOldEndLine;
            }
        }

        public int OldEndIndex
        {
            get
            {
                return this.iOldEndIndex;
            }
        }

        public string Text
        {
            get
            {
                return this.sText;
            }
        }


        public TextChange(int userID, int seq, int startLine, int startIndex, int newEndLine, int newEndIndex, int oldEndLine, int oldEndIndex, string text)
        {
            this.iUserID = userID;
            this.iSeq = seq;
            this.iStartLine = startLine;
            this.iStartIndex = startIndex;
            this.iNewEndLine = newEndLine;
            this.iNewEndIndex = newEndIndex;
            this.iOldEndLine = oldEndLine;
            this.iOldEndIndex = oldEndIndex;
            this.sText = text;
        }
    }
}
